package com.icss.flow.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum OrderEnum {
    ASC("asc","ASC"),
    DESC("desc","DESC");
    private final String order;
    private final String orderName;


    public static OrderEnum getOrder(String extName) {
        for (OrderEnum value : OrderEnum.values()) {
            if (value.getOrderName().equalsIgnoreCase(extName)) {
                return value;
            }
        }
        return ASC;
    }
}
